package com.zml.dao;

import com.zml.entity.Contact;
import com.zml.entity.ContactGroup;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author <a href="mailto:zhaominglin@wxchina.com">minglin.Zhao</a>
 * @Description
 * @Date 2017/11/6
 * @Version 1.0.0
 */
public interface ContactDao {
    List<Contact> getAll();

    int deleteById(@Param("id") int id);

    int updateContact(@Param("contact") Contact contact);

    int addContact(@Param("contact") Contact contact);

    List<ContactGroup> getAllGroupNames();

    int deleteGroupNameWithName(@Param("name") String name);

    int updateGroupNameWithName(ContactGroup group);

    int createGroupNameWithName(ContactGroup group);
}
